﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Windows;

namespace Gw2Overlay
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public static void SaveSettings(Object sender = null, SettingChangingEventArgs e = null)
        {
            Gw2Overlay.Properties.Settings.Default.Save();
        }

        private void Application_LoadCompleted_1(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            Gw2Overlay.Properties.Settings.Default.SettingChanging += new System.Configuration.SettingChangingEventHandler(SaveSettings);
        }

        private void Application_Startup_1(object sender, StartupEventArgs e)
        {
            Debug.Listeners.Add(new TextWriterTraceListener("wuverlay.log"));
            Debug.AutoFlush = true;
            Debug.WriteLine("Log started");
        }
    }
}
